/*
 * ListIterator.cpp
 *
 *  Created on: 23/05/2010
 *      Author: prodrig
 */

#include "ListIterator.h"

ListIterator::ListIterator(Node* node) {
	currentNode = node;
}

void ListIterator::next() {
	if (currentNode != 0)
		currentNode = currentNode->getNext();
}

bool ListIterator::hasCurrent() {
	return currentNode != 0;
}

ICollectible *ListIterator::current() {
	return currentNode->getElement();
}

ListIterator::~ListIterator() {
}
